<template>
  <div>
    <ul>
      <li v-for="userObj in userArr" :key="userObj.id">
      姓名:{{userObj.login}},
      <a :href="userObj.html_url">主页</a>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name:'UserList',
  data() {
    return {
      userArr:''
    }
  },
  mounted() {
    this.$bus.$on('user',(user)=>{
      this.userArr = user.items
    })
  },
}
</script>

<style>

</style>